﻿<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeFile="NewsDetails.aspx.cs" Inherits="Details" Debug="true"%>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="MainContentPic">
    <!--<img src="Images/logo2.jpg" />-->
</asp:Content>
<asp:Content ID="Content2" runat="server" ContentPlaceHolderID="ContentPlaceHolderLeft">
    <img src="Images/logo1.jpg" />
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <asp:DataList ID="DataList1" runat="server" DataKeyField="ID" 
        DataSourceID="SqlDataSource1" BackColor="#FF0066" BorderColor="#00CC00" 
        ForeColor="#3366FF" GridLines="Horizontal" 
        Width="100%">
        <AlternatingItemStyle BackColor="#FFFF99" BorderColor="Red" 
            BorderStyle="Dotted" />
        <EditItemStyle BackColor="#6699FF" />
        <ItemStyle BackColor="Lime" />
        <ItemTemplate>        
             <table style="width:80%">
                <tr>
                    <td style="width:80%">
                    <br />
                    <br />    
                    <%//if (Eval("Detail") == null){}%>   
                    
                    <div class="<%# Eval("Title").ToString()== "" ? "hiddenElement" : "show" %>" > 
                        
                        <a href="Details?ID=<%# Eval("ID") %>" >title = <%# Eval("Title") %></a>
                            <br />                       
                    </div>
                    </td>
                    <td></td>
                </tr>
                <tr>
                    <td style="vertical-align:top">                    
                    Detail:
                    
                        <asp:Label ID="DetailLabel" runat="server" Text='<%# Eval("Detail") %>' />
                        <br />                        
                        </td>
                    <td>
                        <a href="NewsDetails.aspx?ID=<%# Eval("ID") %>" >
                        <img src= "<%# Eval("Image") %>" />
                        </a>
                        <br />
                    </td>
                </tr>
            </table>
            <br />
        </ItemTemplate>
        <SelectedItemStyle BackColor="#99CCFF" />
    </asp:DataList>
    <%String s = "SELECT * FROM [NEWS] WHERE ID = "; %>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:simbafConnectionString %>" 
        oninit="Page_Load"></asp:SqlDataSource>  
</asp:Content>
